<template>
	  
	<pages-index v-show="page=='home'" :title="title" :refresh="refresh"></pages-index>
	<pages-tallk-index v-show="page=='message'" :refresh="refresh"></pages-tallk-index>
	<pages-user-user v-show="page=='account'" :refresh="refresh"></pages-user-user>

	<kb-footer :color="ee.primayColor"></kb-footer>
	<kb-page-bar current="home" @changeItem="onchangeItem"></kb-page-bar>


</template>

<script>
	import PagesIndex from "@/pages/index/com-home.vue";
	import PagesTallkIndex from "@/pages/tallk/index.vue";
	import PagesUserUser from "@/pages/user/user.vue";
	export default {
		components: {
			PagesIndex,
			PagesTallkIndex,
			PagesUserUser
		},
		data() {
			return {
				page: 'home',
				loading: false,
				notice: {},
				sechouse: [],
				rent_type: 0, //出售
				zhutype: 0, //0=二手房 3=新房 2=租房 1=写字楼
				refresh: undefined,
				title:"",
			}
		},
		methods: {
			onchangeItem(name) {
				this.page = name
				if (name == 'message' || name == 'account') {

				}
			},

		},
		onLoad() {
			this.ee.getWxappAccount().then(ret => {
				this.title =  ret?.name || ''
			})

		},
		onPullDownRefresh() {
			this.refresh = true;
			//刷新首页重新获取站点配置
			this.ee.initdata();
			setTimeout(() => {
				uni.stopPullDownRefresh();
				this.refresh = false;
			}, 1000)

		},
		onPageScroll() {
		 
		}
	}
</script>

<style>

</style>